import React, { useState } from 'react'
import style from './index.less'
import { Tabs } from 'antd-mobile'
import Record from './record'
import Message from './message'

export default () => {
  const [state, setState] = useState<string>()
  const handleState = (v:string) => {
    console.log(v);
    setState(v)
  }
  return (
    <div className={style.page}>
      <Tabs className={style.tab} activeKey={state} onChange={handleState}>
        <Tabs.Tab title='发布供货信息' key='message'>
          <Message />
        </Tabs.Tab>
        <Tabs.Tab title='发布记录' key='record'>
          <Record />
        </Tabs.Tab>
      </Tabs>
    </div>
  )
}
